package com.android.wechat;

import com.android.wechat.msg.controller.TMsgController;
import com.android.wechat.msg.entity.TMsgEntity;
import com.android.wechat.msg.service.TMsgService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Date;

@SpringBootTest
@RunWith(SpringRunner.class)
public class test {

    @Autowired
    TMsgService tMsgService;

    @Test
    public void testInsert(){
        TMsgEntity tMsgEntity = new TMsgEntity();
        tMsgEntity.setMsgData("你好，我是劳志警");
        tMsgEntity.setIsreceive(0L);
        tMsgEntity.setReceiveTime(new Date());
        tMsgEntity.setSendTime(new Date());
        tMsgService.save(tMsgEntity);
    }

}
